package com.maybach.core.manager;

import org.apache.commons.fileupload.FileItem;

/**
 * Created by pyshift on 15/9/23.
 */
public interface ImageManager {

    /**
     * 顽兔上传图片
     * @param fileItem
     * @return
     */
    String uploadFileByWt(FileItem fileItem);

    /**
     * 七牛上传图片
     * @param fileItem
     * @return
     */
    String uploadFile(FileItem fileItem);

    /**
     * 七牛上传图片
     * @param bytes 字节数组
     * @return
     */
    String uploadFile(byte[] bytes);


    /**
     * 七牛上传图片
     * @param bytes
     * @param extension 指定后缀
     * @return
     */
    String uploadFile(byte[] bytes, String extension);

    /**
     * 七牛打水印上传
     * @param type
     * @param url
     * @return
     */
    String getShuiUrl(Integer type, String url);

    /**
     * 七牛获取凭证
     * @return
     */
    String getUpToken();

}
